package com.dragon.repository.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 采购单
 * </p>
 *
 * @author sy
 * @since 2023-11-15
 */
@Getter
@Setter
@TableName("dragon_procurement")
public class Procurement implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 采购编号
     */
    private String procuredCode;

    /**
     * 采购标题
     */
    private String title;

    /**
     * 采购人id
     */
    private Integer procuredAdminId;

    /**
     * 采购人部门id
     */
    private Integer procuredDepartmentId;

    /**
     * 供应商id
     */
    private Integer vendorId;

    /**
     * 备注
     */
    private String remark;

    /**
     * 审核状态：0未审核 1审核通过 2不通过 3作废 4删除
     */
    private Integer status;

    /**
     * 采购总金额
     */
    private Double procuredPrice;

    /**
     * 采购时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date procuredTime;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 到货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date arrivalTime;

    /**
     * 类型：1采购 2退货
     */
    private Integer procuredState;

    /**
     * 是否从请购单来 ：1否 2是
     */
    private Integer isPurchase;

    /**
     * 到货状态：0未发货 1已发货 2已到货 3已退货
     */
    private Integer arrivalState;

    /**
     * 创建人id
     */
    private Integer adminId;

    /**
     * 部门id
     */
    private Integer departmentId;

    /**
     * 采购人名称
     */
    @TableField(exist = false)
    private String procuredAdminName;

    /**
     * 采购人部门名称
     */
    @TableField(exist = false)
    private String procuredDepartmentName;

    /**
     * 采购物品list
     */
    @TableField(exist = false)
    private List<ProcurementProduct> procurementProductList;

    /**
     * 工作流 json
     */
    @TableField(exist = false)
    private List<WorkflowJson> workflowJsonList;

    /**
     * 请购单ids
     */
    @TableField(exist = false)
    private String purchaseIds;

    /**
     * 供应商名称
     */
    @TableField(exist = false)
    private String vendorName;

    /**
     * 免审操作：0，不免审，1免审
     */
    @TableField(exist = false)
    private Integer exempt;


}
